(ns clojure_pim.core
  (:use compojure.core,
        ring.adapter.jetty,
        compojure.response
        [ring.util.response :only (response content-type)]
        fleet)
  (:require [compojure.route :as route])
  (:gen-class))

;(extend-protocol Renderable
;  fleet.util.CljString
;  (render [this _] (response (.toString this))))

(fleet-ns view "templates")

(defn display [] (fleet "<p>&copy; Flamefork</p>"))

(defroutes my-routes
  (GET "/" [] (display))
  (route/not-found "<h1>Page not found</h1>"))

(defonce server (run-jetty #'my-routes
                           {:join? false
                            :port 8081}))